#!/bin/bash

projectName="yudao-server"

echo "==============================================="
echo "begin stop $projectName"
# shellcheck disable=SC2009
pidList=$(ps -ef | grep java | grep "$projectName" | grep -v grep | awk '{print $2}')
if [ -z "$pidList" ]; then
    echo "not found $projectName pid"
else
    kill -9 $pidList
    echo "kill $projectName pid $pidList"
fi

echo "end stop $projectName"
echo "==============================================="

exit 0